package com.atguigu.tingshu.user.client;

import com.atguigu.tingshu.common.result.Result;
import com.atguigu.tingshu.model.user.UserPaidTrack;
import com.atguigu.tingshu.user.client.impl.UserPaidTrackDegradeFeignClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * <p>
 * 用户购买过的专辑 API接口
 * </p>
 *
 * @author qy
 */
@FeignClient(value = "service-user", fallback = UserPaidTrackDegradeFeignClient.class)
public interface UserPaidTrackFeignClient {

    @GetMapping("api/user/userPaidTrack/findUserPaidTrack/{userId}/{albumId}")
    Result<List<UserPaidTrack>> findUserPaidTrack(@PathVariable("userId") Long userId,
                                                  @PathVariable("albumId") Long albumId);

}